package com.alcatel_lucent.osp.service;

import com.alcatel_lucent.osp.model.Request;
import com.alcatel_lucent.osp.model.User;

import java.io.File;
import java.util.Collection;
import java.util.Map;

public interface NotificationService {

    void setWebRoot(String webRoot);
    /**
     * Notify owners creation of a new request
     *
     * @param request
     */
    void notifyNewRequest(Request request);

    /**
     * Notify owners creation of a new rd360 request
     *
     * @param request
     */
    void notifyNewRd360Request(Request request);

    /**
     * Notify stakeholders update of request (status change and/or new comment)
     * If request is updated by reporter, notify all owners;
     * If request is updated by an owner, notify reporter and cc all other owners
     *
     * @param request request
     * @param changes description of value changed
     * @param comments user comments
     * @param user operator
     */
    void notifyUpdateRequest(Request request, String changes, String comments, User user);


    /**
     * Notify stakeholders update of rd360 request (status change and/or new comment)
     * If request is updated by reporter, notify all owners;
     * If request is updated by an owner, notify reporter and cc all other owners
     *
     * @param request request
     * @param changes description of value changed
     * @param comments user comments
     * @param user operator
     */
    void notifyUpdateRd360Request(Request request, String changes, String comments, User user);

    /**
     * Send mail
     *
     * @param from    send from
     * @param model   mail template variable model
     * @param vmFile  mail template file
     * @param subject mail subject
     * @param mailTo  mail to
     * @param mailCc  mail cc
     * @param files   mail attachments
     */
    void sendMail(final String from, final Collection<String> mailTo, final Collection<String> mailCc,
                  final Map<String, Object> model, final String vmFile, final String subject,
                  final File... files);

    /**
     * Notify untreated requests which NEW status more than one week.
     * */
    void notifyUntreatedRequests();

}
